package com.xy.dp.observer;

public class Program {
    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        Student s1 = new Student();
        Student s2 = new Student();
        Student s3 = new Student();
        teacher.registerObserver(s1);
        teacher.registerObserver(s2);
        teacher.registerObserver(s3);
        teacher.setPhone("123456");
        System.out.println(s1.getPhone());

    }
}
